<template>
    <div class="top">
        <div class="table">
            <Table :columns="columns1" :data="data1" :height="24"></Table>
        </div>
        <div class="contextmenu">
            <vue-context-menu 
                @copyIp="copyIp"
                @copyTele="copyTele"
                @copyInfo="copyInfo"
                @preventIp="preventIp"
                @addToBlackList="addToBlackList"
                @settingCols="settingCols"
                :contextMenuData="contextMenuData">
            </vue-context-menu>
        </div>
    </div>
</template>
<script>
export default {
    data () {
        return {
            columns1:[
                {key: 'status', title: '状态',sortable:true},
                {key: 'leavetime', title: '离开',sortable:true},
                {key: 'channel', title: '渠道',sortable:true},
                {key: 'vid', title: '访客ID',sortable:true},
                {key: 'vname', title: '姓名',sortable:true},
                {key: 'phone', title: '电话回拨',sortable:true},
                {key: 'vtime', title: '次数',sortable:true},
                {key: 'ip', title: 'IP地址',sortable:true},
                {key: 'location', title: '地理位置',sortable:true},
                {key: 'keywords', title: '搜索引擎/关键词',sortable:true},
                {key: 'rejecttime', title: '拒绝次数',sortable:true},
                {key: 'vdatetime', title: '进入',sortable:true},
                {key: 'waittime', title: '等待',sortable:true},
                {key: 'lastmsg', title: '最后消息',sortable:true},
                {key: 'server', title: '客服',sortable:true},
                {key: 'lang', title: '语种',sortable:true},
                {key: 'url', title: '最近访问页面',sortable:true},
            ],
            data1: [],
            contextMenuData:{
                menuName: 'dynamicCols',
                axios: {
                    x: null,
                    y: null
                },
                menulists: [
                    {
                        fnHandler: 'copyIp', // Binding events(绑定事件)
                        btnName: '发送给访客(V)' // The name of the menu option (菜单名称)
                    },{
                        fnHandler: 'copyTele',
                        btnName: '编辑后发送(W)'
                    },{
                        fnHandler: 'copyInfo',
                        btnName: '复制内容(X)'
                    },{
                        fnHandler: 'preventIp',
                        btnName: '常用语管理(Y)'
                    },{
                        fnHandler: 'addToBlackList',
                        btnName: '刷新(Z)'
                    },{
                        fnHandler: 'settingCols',
                        btnName: '配置动态列'
                    }
                ]
            }
        }
    },
    methods: {
        copyIp () {

        },
        copyTele () {

        },
        copyInfo () {

        },
        preventIp () {

        },
        addToBlackList () {

        },
        settingCols () {

        }
    },
    created () {

    }
}
</script>
<style lang="scss" scoped>
.top {
    .table {
        width: 100%;
        .ivu-table-wrapper {
            .ivu-table-header {
                th {
                    // padding: 0;
                }
            }
        }
    }
}
</style>
